package net.ikenna.yadet;

import net.ikenna.yadet.core.*;
import net.ikenna.yadet.core.data.*;
import net.ikenna.yadet.core.rowprocessor.*;
import net.ikenna.yadet.springjdbc.*;
import org.picocontainer.*;
import org.springframework.jdbc.core.*;


class Container<T> {

    private MutablePicoContainer pico = new DefaultPicoContainer();

    Container(){
        add(DataManipulator.class);
        add(YadetTestDataSource.class);
        add(JdbcTemplate.class);
        add(SimpleRowProcessor.class);
        add(SpringJdbcTemplateExtractor.class);
        add(SpringJdbcTemplateInserter.class);
        add(ListDataLogger.class);
        add(Row.HtmlStrippingCellProcessor.class) ;
    }

    Object get(Class<T> clazz) {
        return pico.getComponent(clazz);
    }

    void add(Class clazz) {
        pico.addComponent(clazz);
    }
}
